package com.huaxin.hxmoduleworkorder.dto.request;

import com.baomidou.mybatisplus.annotation.TableField;
import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidInspectionReadStatus;
import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidInspectionSendStatus;
import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidOrderType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class GetOrderNotificationInSystemByUserIdReqDTO {

    @Schema(description = "用户ID", example = "e1001")
    @NotBlank(message = "用户ID不能为空")
    @Size(max = 50, message = "用户ID长度不能超过50个字符")
    private String userId;

    @Schema(description = "分页页码", example = "1")
    @Min(value = 1, message = "分页页码不能小于1")
    @Max(value = 10000, message = "分页页码不能大于10000")
    @NotNull(message = "分页页码不能为空")
    private Integer pageNum;

    @Schema(description = "分页每页数量", example = "10")
    @Min(value = 1, message = "分页每页数量不能小于1")
    @Max(value = 100, message = "分页每页数量不能大于100")
    @NotNull(message = "分页每页数量不能为空")
    private Integer pageSize;

    @Schema(description = "工单类型：inspection（巡查）/maintenance（维修）/install（安装）", example = "maintenance")
    @NotBlank(message = "工单类型不能为空")
    @Size(max = 30, message = "工单类型长度不能超过30个字符")
    @ValidOrderType
    private String orderType;

    @Schema(description = "工单ID", example = "mnt_order_001")
    @NotBlank(message = "工单ID不能为空")
    @Size(max = 50, message = "工单ID长度不能超过50个字符")
    private String orderId;

    @Schema(description = "工单电工任务ID", example = "mnt_order_electrician_task_001")
    @Size(max = 50, message = "工单电工任务ID长度不能超过50个字符")
    private String orderElectricianTaskId;

    @TableField(value = "send_status")
    @Schema(description = "发送状态：pending/sent/failed", example = "sent")
    @ValidInspectionSendStatus
    private String sendStatus;

    @TableField(value = "read_status")
    @Schema(description = "阅读状态：unread/read", example = "unread")
    @ValidInspectionReadStatus
    private String readStatus;
}
